package com.demo.service;

import com.demo.utils.FileUpUtils;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;

/**
 * @author gy
 * @date 2023/2/10
 */
public interface FileHandleService {
    /**
     * 上传文件
     * @param file 文件
     * @param absolutePath 服务器绝对路径
     * @return
     */
    String uploadFiles(MultipartFile file, String absolutePath);

    /**
     * 下载文件
     * @param response
     * @param filesUrl 文件url地址
     * @return
     * @throws UnsupportedEncodingException
     */
    String downLoad(HttpServletResponse response,String filesUrl) throws UnsupportedEncodingException;
}
